{% extends 'base.html' %}

{% block main_body %}
    <div style="min-height: 458px;">
        <section class="content-header">
          <h1>
            实时网络监控
          </h1>
        </section>

        <section class="content container-fluid">
          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <form class="form-horizontal" action="#">
                    <div class="box-body">
                        <div class="form-group">
                          <div class="col-sm-10">
                              <a style="width:50px;" href = "{% url 'real_time_start' %}">开始检测</a>
                              <a style="width:50px;" href = "{% url 'real_time_stop' %}">结束检测</a>
                              {% if datas %}
                              <div class="col-sm-offset-2 col-sm-10">
                                    <table class="table">
                                      <caption>Real Time Monitor</caption>
                                      <thead>
                                        <tr>
                                        <th>patch</th>
                                        <th>path</th>
                                        <th>time</th>
                                            <th>payload</th>
                                            <th>method</th>
                                        </tr>
                                      </thead>
                                      <tbody>
                                        {% for xss in datas %}
                                        <tr>
                                        <td>{{xss.name}}</td>
                                        <td>{{xss.path}}</td>
                                        <td>{{xss.create_time}}</td>
                                            <td>{{xss.payload}}</td>
                                            <td>{{xss.methodName}}</td>
                                        </tr>
                                        {% endfor %}
                                      </tbody>
                                    </table>
                              </div>
                              {% endif %}
                          </div>
                        </div>
                    </div>
                </form>
              </div>
            </div>
          </div>
        </section>
    </div>
{% endblock %}
